<template>
  <div id="app">
    <cnode-header></cnode-header>
    <router-view :authorName="authorName" @sendAuthorName="updateAuthorName" ref="child" name="main"></router-view>
    <router-view :authorName="authorName" @refreshArticle="refreshArticle" name="side" ></router-view>
  </div>
</template>

<script>
import cnodeHeader from "@/components/cnodeHead";
export default {
  name: 'App',
  data(){
    return {
      authorName: '',
    }
  },
  components:{
    cnodeHeader
  },
  methods:{
    updateAuthorName(val){
      this.authorName = val;
    },
    refreshArticle(){
      this.$refs.child.refreshArticle();
    }
  },
  watch:{
  }
}
</script>

<style>
  @import url("https://cdn.bootcss.com/element-ui/1.2.8/theme-default/index.css");
  #app{
    font-family: 微软雅黑 ,"Microsoft YaHei";
    margin-top:6rem;
    display: flex;
    justify-content: space-around;
  }
body,
div,
span,
a,
p,
ul,
li {
  margin: 0;
  padding: 0;
}
</style>
